/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-12-02
 * Time: 20:16
 */
import java.util.*;

public class Demo3 {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);


        while(scan.hasNextInt()){
            int n =scan.nextInt();
            long f1 = 1;
            long f2 = 0;
            long f3 = 0;
            for(int i = 0; i < n; i++) {
                f3 = f1 + f2;
                f2 = f1;
                f1 = f3;
            }

            System.out.println(f1);
        }
    }
}
